<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage PluginsFunction
 */
/**
 * Smarty {counter} function plugin
 *
 * Type: function<br>
 * Name: counter<br>
 * Purpose: print out a counter value
 *
 * @author Monte Ohrt <monte at ohrt dot com>
 * @link http://www.smarty.net/manual/en/language.function.counter.php {counter}
 * (Smarty online manual)
 * @param array $params
 * parameters
 * @param Smarty_Internal_Template $template
 * template object
 * @return string null
 */
function smarty_function_image($params, $template) {
	// 获取制定分类的内容
	if (isset ( $params ['id'] )) {
		$newsService = new NewsService ( 1, 2 );
		$rs = $newsService->getCon ( $params ['id'] );
		$template->assign ( $params ['assign'], $rs['content']['module'] );
	}

}

?>